-
-
Notifications
You must be signed in to change notification settings - Fork 347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature] Log OTEL internal logs #3202
base: main
Are you sure you want to change the base?
[feature] Log OTEL internal logs #3202
Conversation
@@ -20,6 +20,7 @@ package log | |||
import ( | |||
"context" | |||
"fmt" | |||
"github.com/go-logr/logr" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please respect the import sorting, stdlib first, external in a second block.
This adds ogging output when tracing is enabled that's not necessarily useful to people under normal conditions. I agree it's useful for debugging tracing issues, but I think we should put this behind a config flag that enables the internal tracing logger only when requested. Something like |
honestly i was going to suggest maybe moving this into the tracing package itself so this code is only there when the build tag is enabled. are you good with me having a poke around on this branch @Tsuribori and maybe trying shifting it around? |
Sure |
I think that's fine too, but I would still like to be able to run with tracing enabled but without additional logging by the tracer itself. |
Description
Currently the internal logs of the OTEL library aren't logged making it hard to debug situations like #3117
The OTEL library expects a Logr logger to be passed to it so this pull request implements a Logr
LogSink
that logs through the existing logging mechanism.When tracing is enabled this will produce logs like the following for example:
Checklist
Please put an x inside each checkbox to indicate that you've read and followed it:
[ ]
->[x]
If this is a documentation change, only the first checkbox must be filled (you can delete the others if you want).
go fmt ./...
andgolangci-lint run
.